{% extends 'base.html' %}
{% block title %}<title>VM Monitoring</title>{% endblock %}

{% block common_content %}

    <form name="deploynbva" action="/vsphere/deploy" method="post"> {% csrf_token %}
        <div class="panel panel-default">
            <div class="panel-heading">ESXi server settings</div>
            <div class="panel-body">
                <div class="form-group col-xs-12">
                    <label>* Deploy from a file or URL</label>
                    <div class="input-group">
                        <input type="text" name="voafilepath" class="form-control" required>
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default" data-toggle="popover">Browse...</button>
                        </span>
                    </div>
                </div>
                <div class="form-group col-md-6 col-xs-12">
                    <label>* Datastore</label>
                    <div class="input-group">
                        <input type="text" name="datastore" class="form-control" required>
                        <span class="input-group-btn">
                            <button type="button" class="btn btn-default" data-toggle="popover">Browse...</button>
                        </span>
                    </div>
                </div>
                <div class="form-group col-md-6 col-xs-12">
                    <label>Virtual machine name</label>
                    <input type="text" name="hostname" class="form-control" placeholder="If empty, host name will be used">
                </div>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading">Virtual Appliance Network Settings</div>
            <div class="panel-body">
                <div class="form-group col-md-8 col-xs-12">
                    <label>* IP address (Use ';' to separate each IP, Use '-' to specify a range of IP)</label>
                    <input type="text" name="ipaddr" class="form-control" required>
                </div>
                <div class="form-group col-md-4 col-xs-12">
                    <label>Host name</label>
                    <input type="text" name="hostname" class="form-control" placeholder="If empty, IP address will be used">
                </div>
                <div class="form-group col-md-6 col-sm-12 col-xs-12">
                    <label>* DNS domain name</label>
                    <input type="text" name="dnsdomain" class="form-control" placeholder="The DNS Domain where you are adding this NetBackup Virtual Appliance" required>
                </div>
                <div class="form-group col-md-6 col-sm-12 col-xs-12">
                    <label>* DNS server</label>
                    <input type="text" name="dnsserver" class="form-control" placeholder="The primary DNS server for this NetBackup Virtual Appliance" required>
                </div>
                <div class="form-group col-md-6 col-sm-12 col-xs-12">
                    <label>* Netmask</label>
                    <input type="text" name="netmask" class="form-control" placeholder="The netmask for this NetBackup Virtual Appliance" required>
                </div>
                <div class="form-group col-md-6 col-sm-12 col-xs-12">
                    <label>* Gateway</label>
                    <input type="text" name="gateway" class="form-control" placeholder="The gateway for this NetBackup Virtual Appliance" required>
                </div>
                <div class="btn-group pull-right">
                    <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                        Load Default Network Setting<span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu">
                        <li><a onclick="fillNetworkSetting()">Beijing Leb NBVA Network Setting</a></li>
                        <li><a href="#">Chengdu Leb</a></li>
                        <li><a href="#">MountainView Leb</a></li>
                    </ul>
                </div>
            </div>
        </div>


        <div class="panel panel-default">
            <div class="panel-heading">Virtual Appliance Role Settings</div>
            <div class="panel-body">
                <div class="form-group col-md-6 col-sm-12 col-xs-12">
                    <label>AdvancedDisk disk pool name</label>
                    <input type="text" name="adpool" class="form-control" placeholder="default: dp_adv_hostname">
                </div>
                <div class="form-group col-md-6 col-sm-12 col-xs-12">
                    <label>AdvancedDisk storage unit name</label>
                    <input type="text" name="adstu" class="form-control" placeholder="default: stu_adv_hostname">
                </div>
                <div class="form-group col-md-6 col-sm-12 col-xs-12">
                    <label>MSDP disk pool name</label>
                    <input type="text" name="msdppool" class="form-control" placeholder="default: dp_disk_hostname">
                </div>
                <div class="form-group col-md-6 col-sm-12 col-xs-12">
                    <label>MSDP storage unit name</label>
                    <input type="text" name="msdpstu" class="form-control" placeholder="default: stu_disk_hostname">
                </div>
            </div>
        </div>

        <div class="form-group col-md-6 col-sm-12 col-xs-12">
            <label>Power on after deploy: </label>
            <div class="radio-inline">
                <label>
                    <input type="radio" name="poweron" id="poweronRadios1" value="yes" checked>
                    Yes
                </label>
            </div>
            <div class="radio-inline">
                <label>
                    <input type="radio" name="poweron" id="poweronRadios2" value="no">
                    No
                </label>
            </div>
        </div>
        <div class="form-group">
            <button type="submit" class="btn btn-default pull-right">Deploy</button>
        </div>
    </form>

{% endblock %}


